<!DOCTYPE html>
<html>
<head>
    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta http-equiv="Access-Control-Allow-Origin" content="*">
    <link href="${ctx}/assets/css/bootstrap.min.css" rel="stylesheet"/>
    <script src="${ctx}/assets/js/charts/Echarts/jquery-2.0.3.min.js"></script>
    <script src="${ctx}/assets/js/charts/Echarts/echarts.min.js" charset="utf-8"></script>
    <script src="${ctx}/assets/js/charts/Echarts/china.js" charset="utf-8"></script>
</head>
<body>
<div class="section-content company-section-content" style="background-color: #f3f3f3;padding-bottom:20px;padding-right: 30px">
    <div class="row" style="margin-bottom: 5px">
        <div class="col-sm-6 col-xs-12" style="padding: 5px;">
            <div class="card bd-desc-item" style=" -webkit-box-shadow: 3px 3px 3px #e7eaec; -moz-box-shadow: 3px 3px 3px #e7eaec; box-shadow: 3px 3px 3px #e7eaec; ">
                <div class="img-outer" style="background-color: #fff;padding: 10px;">
                    <div id="nationalClue" class="img-inner" style="height: 400px;"></div>
                </div>
            </div>
        </div>
        <div class="col-sm-6 col-xs-12" style="padding: 5px;">
            <div class="card bd-desc-item" style=" -webkit-box-shadow: 3px 3px 3px #e7eaec; -moz-box-shadow: 3px 3px 3px #e7eaec; box-shadow: 3px 3px 3px #e7eaec; ">
                <div class="img-outer" style="background-color: #fff;padding: 10px">
                    <div id="todayChannel" class="img-inner" style="height:400px; "></div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-6 col-xs-12" style="padding: 5px;">
            <div class="card bd-desc-item" style=" -webkit-box-shadow: 3px 3px 3px #e7eaec; -moz-box-shadow: 3px 3px 3px #e7eaec; box-shadow: 3px 3px 3px #e7eaec; ">
                <div class="img-outer" style="background-color: #fff;padding: 10px">
                    <div id="largeArea" class="img-inner" style="height: 400px;"></div>
                </div>
            </div>
        </div>
        <div class="col-sm-6 col-xs-12" style="padding: 5px;">
            <div class="card bd-desc-item" style=" -webkit-box-shadow: 3px 3px 3px #e7eaec; -moz-box-shadow: 3px 3px 3px #e7eaec; box-shadow: 3px 3px 3px #e7eaec; ">
                <div class="img-outer" style="background-color: #fff;padding: 10px">
                    <div id="customer" class="img-inner" style="height: 400px;"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function () {
        var data;
        var largeAreaUrl = '<@config key="workbenchLargeArea"/>';
        var largeAreaId = "largeArea";
        var customerUrl = '<@config key="workbenchCustomer"/>';
        var customerId = "customer";
        var nationalClueUrl = '<@config key="workbenchNationalClue"/>';
        var nationalClueId = "nationalClue";
        var todayChannelUrl = '<@config key="workbenchChannel"/>';
        var todayChannelId = "todayChannel";

        function getData(url, divId) {
            $.ajax({
                url: url,
                type: 'GET',
                dataType: 'JSONP',
                success: function (json) {
                    sption(json[0].data, divId);
                }
            })
        }

        function sption(data, divId) {
            var myChart = echarts.init(document.getElementById(divId));
            myChart.setOption(data);
        }

        getData(largeAreaUrl, largeAreaId);
        getData(customerUrl, customerId);
        getData(nationalClueUrl, nationalClueId);
        getData(todayChannelUrl, todayChannelId);
    });
</script>
</body>
</html>
